package com.marvels.approve.process.dao;


import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.github.pagehelper.Page;
import com.marvels.approve.process.dto.FaceSigAppointmentDTO;

public interface IFaceSigAppointmentDao {
	/**
	 * 视频面签查询
	 * @param facesigappointment
	 * @return
	 */
	public Page<FaceSigAppointmentDTO> selectVideoFaceSigPage(@Param("faceJobId") String faceJobId,@Param("faceSigStatusList") String [] faceSigStatusList);
	
	/**
	 * 
	 * 查询预约流水记录 
	 * @param facesigappointment
	 * @return
	 */
	public Page<FaceSigAppointmentDTO> selectFaceSigPage(FaceSigAppointmentDTO faceSigAppointmentDTO);
	
	/**
	 * 
	 * 查询面签状态
	 */
	public 	FaceSigAppointmentDTO selectFaceSigStatus(String faceJobId);
	
	
	/**
	 * 
	 * 新建面签任务
	 * @param facesigappointment
	 * @return
	 */
	public int addFacesigTask(FaceSigAppointmentDTO faceSigAppointmentDTO);
	
	/**
	 * 
	 * 查询面签时间
	 * @param loanId
	 * @return
	 */
	
	public FaceSigAppointmentDTO selectRangeTime(String loanId);
	
	/**
	 * 修改面签
	 * @param faceSigAppointmentDTO
	 * @return
	 */
	public int updateAppointment(FaceSigAppointmentDTO faceSigAppointmentDTO);
	
	 /**
     * 查询出需要提示的预约面签
     * @return
     */
	public List<FaceSigAppointmentDTO> selectNeedTips();
	
	/**
	 * 
	 * 查询面签取件
	 */
	public List<FaceSigAppointmentDTO> selectFacesigTake();
	
	
	/***
	 * 
	 */
	public Integer getFacesigTakeNumber(String faceJobId);
	
	public Integer queryCount();
	
	public Map<String,Object> selectHoliday(Map<String, Object> map);
	
	public FaceSigAppointmentDTO selectByPrimaryKey(Integer id);
	
	public Integer checkRepeartLoanId(String loanId);
	
	public Integer updateScanOutmoded();
	
	public Integer insertData(Map<String,Object> paramMap);
	
	public Integer selectUndoSignTask(@Param("faceJobId")String faceJobId);
	
	public FaceSigAppointmentDTO queryCancelStatus(@Param("id")Integer appointmentId);
	
//	public Integer queryDateTimeCount(@Param("date")Date date,@Param("timeId") Integer timeId);
	/**
	 * 更新面签处理人
	 * @param faceSigAppointmentDTO
	 * @return
	 */
	public Integer updateFaceSignHandler(FaceSigAppointmentDTO faceSigAppointmentDTO);
	/**
	 * 获取当前节点需要面签的案件
	 * @param curNodeCode
	 * @return
	 */
	public List<FaceSigAppointmentDTO> selectAllNeedPickUpCase(@Param("curNodeCode")String curNodeCode);
	/**
	 * 获取时间段内面签过的数量
	 * @param faceSigAppointmentDto
	 * @return
	 */
	public Integer selectExistFacesignedCase(FaceSigAppointmentDTO faceSigAppointmentDto);
	/**
	 * 获取已预约的人数
	 * @param faceSigAppointmentDto
	 * @return
	 */
	public Integer queryDateTimeCount(FaceSigAppointmentDTO faceSigAppointmentDto);
	/**
	 * 取消助理
	 * @param assistantId
	 * @param id
	 * @return
	 */
	public Integer cancelAllot(@Param("assistantId")Integer assistantId,@Param("id")Long id);
	/**
	 * 判断是否是重新预约
	 * @param loanId
	 * @return
	 */
	public Integer selectedPassedCount(@Param("loanId")String loanId);
}
